import axios from 'axios'
axios.defaults.withCredentials=true

//强烈推荐
export function request(config) {
  const instance = axios.create({
    baseURL: 'http://localhost:8080',
    timeout: 3000,
    headers: {
      //cookie:'goSessionid=8H4cvMr-3PFk8j1LvZ9PxVS_ShPx9zyMee5KBVPbjnw%3D; __remember_me=true; MUSIC_U=fa2a1553f6b85a8069e7a77c5acca8aa5ccd1e6e5fb11054321ad6c01912bb78993166e004087dd34e1bdb063f1aff0e5651aca6963bfea4b6043de81f88a4249840479cb077b2da7a561ba977ae766d; __csrf=995fa51a5b3fb30bd7cefa39fc7cd7ff; NMTID=00OFGc0wBy8xue3J0xPvSmkGa4xLj8AAAGBVyd6oQ'
    },
    //withCredentials: true,
  })

  //本身就是promise
  return instance(config)
}   
